package com.jt.demo;

import org.springframework.stereotype.Component;

@Component   //将类交给Spring容器管理， key=Dog  value=反射后的对象
public class Dog implements Pet{
    @Override
    public void hello(){
        System.out.println("狗子叫");
    }
}
